How to find the datatype of the variable in java